package com.whstudio.util.xml;

import java.io.IOException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;

import com.sun.org.apache.xerces.internal.parsers.DOMParser;

public class ConfigReader {
	public static Document getDoc(String filespec) {
		DOMParser parser = new DOMParser();
		try {
			parser.parse(filespec);
		} catch (SAXException se) {
			System.out.println("Parser error found: " + se.getMessage());
			//System.exit(1);
		} catch (IOException ioe) {
			System.out.println("IO error found: " + ioe.getMessage());
			//System.exit(1);
		}
		Document doc = parser.getDocument();
		return doc;
	}
}